 /**
 * ESUI (Enterprise Simple UI)
 * Copyright 2013 Baidu Inc. All rights reserved.
 *
 * @file 对话框样式
 * @author dbear
 */

@import "Variable.less";

@esui-dialog-border-radius: 0;
@esui-dialog-zIndex: @dialog-z-index;
@esui-dialog-close-default-width: 600px;

@esui-dialog-title-line-height: 2.5em;
@esui-dialog-title-padding: 0 1em;

@esui-dialog-close-position-right: 1em;
@esui-dialog-close-position-top: .75em;

@esui-dialog-body-padding: .5em 1em;

@esui-dialog-footer-panel-padding: 1em;
@esui-dialog-footer-panel-margin: 0;

.@{ui-class-prefix}-dialog {
    position: absolute;
    .esui-border-radius(
        @esui-dialog-border-radius,
        @esui-dialog-border-radius
    );
    z-index: @esui-dialog-zIndex;
    width: @esui-dialog-close-default-width;
    display: block;

    .esui-dialog-theme();
}

.@{ui-class-prefix}-dialog-head {
    .user-select(none);

    .esui-dialog-head-theme();
}

.@{ui-class-prefix}-dialog-close-icon {
    position: absolute;
    right: @esui-dialog-close-position-right;
    top: @esui-dialog-close-position-top;
    cursor: pointer;

    .esui-dialog-close-icon-theme();
}

.@{ui-class-prefix}-dialog-title {
    line-height: @esui-dialog-title-line-height;
    padding: @esui-dialog-title-padding;

    .esui-dialog-title-theme();
}

.@{ui-class-prefix}-dialog-body {
    padding: @esui-dialog-body-padding;

    .esui-dialog-body-theme();
}

.@{ui-class-prefix}-dialog-foot-panel {
    padding: @esui-dialog-footer-panel-padding;
    margin: @esui-dialog-footer-panel-margin;

    .esui-dialog-foot-panel-theme();
}

.@{ui-class-prefix}-dialog-foot {
    .esui-dialog-foot-theme();
}

.@{ui-class-prefix}-dialog-draggable {
    .@{ui-class-prefix}-dialog-head {
        cursor: move;
    }

    .esui-dialog-draggable-theme();
}

.@{ui-class-prefix}-dialog-dragging {
    .user-select(none);
    .esui-dialog-dragging-theme();
}

.@{ui-class-prefix}-dialog-mask {
    .esui-dialog-mask-theme();
}

.@{ui-class-prefix}-dialog-alert,       
.@{ui-class-prefix}-dialog-confirm {        
    .@{ui-class-prefix}-dialog-body {       
        display: table;
        padding: 0;
        width: 100%;
    }
}

.@{ui-class-prefix}-dialog-icon {
    display: table-cell;
    vertical-align: middle;
    span {
        font-size: 4em;
    }
    padding: @esui-dialog-body-padding;
    padding-right: 0;
    width: 1%;
    // 警告和确认框
    & + .@{ui-class-prefix}-dialog-text {
        width: 100%;
        display: table-cell;
        vertical-align: middle;
        padding: @esui-dialog-body-padding;
    }
}

.@{ui-class-prefix}-dialog-icon-warning {
    .esui-dialog-warning-icon-theme();
}

.@{ui-class-prefix}-dialog-icon-confirm {
    .esui-dialog-confirm-icon-theme();
}

// 扩展mixin
.esui-dialog-theme() {}

.esui-dialog-head-theme() {}

.esui-dialog-close-icon-theme() {}

.esui-dialog-title-theme() {}

.esui-dialog-body-theme() {}

.esui-dialog-foot-panel-theme() {}

.esui-dialog-foot-theme() {}

.esui-dialog-draggable-theme() {}

.esui-dialog-dragging-theme() {}

.esui-dialog-mask-theme() {}

.esui-dialog-warning-icon-theme() {}
